<admintpl file="header" />
</head>
<body>
<div class="wrap">
	<ul class="nav nav-tabs">
		<li><a href="{:U('Smstemplate/index')}">模板列表</a></li>
		<li><a href="{:U('Smstemplate/add')}">添加模板</a></li>
		<li class="active"><a href="javascript:;">编辑模板</a></li>
	</ul>
	<form method="post" class="form-horizontal js-ajax-form" action="{:U('Smstemplate/edit_post')}">
		<fieldset>
			<div class="control-group">
				<label class="control-label"><b style="color:red;">* </b> 模板编号</label>
				<div class="controls">
					<input type="text"  value="{$sms.sms_code}" disabled>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label"><b style="color:red;">* </b> 模板名称</label>
				<div class="controls">
					<input type="text" name="sms_name" value="{$sms.sms_name}">
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">选项</label>
				<div class="controls">
					<a href="javascript:volid(' #VerificationCode# ')">验证码 </a>
					<a href="javascript:volid(' #Order# ')"> 订单号</a>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label"><b style="color:red;">* </b> 内容</label>
				<div class="controls">
					<textarea name="sms_content" rows="2" cols="20" id="content" class="inputtext" style="height: 100px; width: 500px;">{$sms.sms_content}</textarea>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">{:L('STATUS')}</label>
				<div class="controls">
					<if condition="$sms.use_flg eq 1">
						<label class="radio inline" for="active_true"><input type="radio" name="use_flg" value="1" checked  />{:L('ENABLED')}</label>
						<label class="radio inline" for="active_false"><input type="radio" name="use_flg" value="0"  >{:L('DISABLED')}</label>
					<else />
						<label class="radio inline" for="active_true"><input type="radio" name="use_flg" value="1" />{:L('ENABLED')}</label>
						<label class="radio inline" for="active_false"><input type="radio" name="use_flg" value="0" checked >{:L('DISABLED')}</label>
					</if>
				</div>
			</div>
		</fieldset>
		<div class="form-actions">
			<input type="hidden" name="id" value="{$sms.id}">
			<button type="submit" class="btn btn-primary js-ajax-submit">{:L('EDIT')}</button>
			<a class="btn" href="javascript:history.back(-1);">{:L('BACK')}</a>
		</div>
	</form>
</div>
<script>
    function volid(data) {
        var text = $('#content').val() + data;
        $('#content').val(text);
    }
</script>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>